{% extends 'main.html' %}

{% block content %}
{# 编辑账户信息主体 start #}
<main class="update-account layout">

    <div class="container">

        <div class="layout__box">

            <div class="layout__boxHeader">

                <div class="layout__boxTitle">

                    <a href="{% url 'user-profile' request.user.id %}">
                        <svg version="1.1" xmlns="http://www.w3.org/2000/svg" width="32" height="32"
                            viewBox="0 0 32 32">
                            <title>arrow-left</title>
                            <path
                                d="M13.723 2.286l-13.723 13.714 13.719 13.714 1.616-1.611-10.96-10.96h27.625v-2.286h-27.625l10.965-10.965-1.616-1.607z">
                            </path>
                        </svg>
                    </a>

                    <h3>个人资料</h3>

                </div>

            </div>

            <div class="layout__body">

                {# 个人信息表单 start #}
                <form method="post" class="form" action="#" enctype="multipart/form-data">
                    {% csrf_token %}

                    {% for field in form %}
                        <div class="form__group">
                            <label for="profile_pic">{{ field.label }}</label>
                            {{ field }}
                        </div>
                    {% endfor %}


{#                    <div class="form__group">#}
{#                        <label for="profile_pic">头像</label>#}
{#                        <input id="profile_pic" name="profile_pic" type="file" />#}
{#                    </div>#}
{##}
{#                    <div class="form__group">#}
{#                        <label for="username">用户名</label>#}
{#                        <input id="username" name="username" type="text" value="{{ user_pk.username }}" />#}
{#                    </div>#}
{##}
{#                    <div class="form__group">#}
{#                        <label for="email">Email</label>#}
{#                        <input id="email" name="email" type="text" value="{{ user_pk.email }}" />#}
{#                    </div>#}
{##}
{#                    <div class="form__group">#}
{#                        <label for="user_bio">我的个签</label>#}
{#                      <textarea name="user_bio" id="user_bio" placeholder="人间本不该令我这么欣喜的，但是你来了..."></textarea>#}
{#                      <textarea name="user_bio" id="user_bio" content="{{ user_pk.user_bio }}"></textarea>#}
{#                    </div>#}

                    <div class="form__action">
                        <a class="btn btn--dark" href="{% url 'home' %}">取消</a>
                        <button class="btn btn--main" type="submit">确认</button>
                    </div>

                </form>
                {# 个人信息表单 end #}

            </div>

        </div>

    </div>

</main>
{# 编辑账户信息主体 end #}
{% endblock content %}

